package com.gu.mobileweb.controller;

import com.gu.mobileweb.model.IndexStay;
import com.gu.mobileweb.service.IndexStayService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/home/stay")
public class IndexStayController {
    @Autowired
    private IndexStayService indexStayService;

    @GetMapping("/list")
    public List<IndexStay> stayList(){
        return indexStayService.stayList();
    }
}
